[#ftl]
[#assign entityName="Article"]
[#assign pathRoot="/admin/cms/article/article_"]
[@jsec.authPage perms=["${entityName}_list"]/]
[#assign prms=jweb.params("prm")]
[@frame.root]
  <!-- Default panel contents -->
  [@frame.header]
  [@frame.title]文章[/@]
	  [@frame.searchForm id="search" prms=prms.ogin]
	       [@frame.input id="prm.title" label="标题"/]
	    [/@]
    [@jsec.authBlock perms=["${entityName}ctrl"]]
  [@frame.toolsBar]
    [@frame.toolsBtn label="新建文章" class="btn-success" href="${base}${pathRoot}normal_form.shtml" icon="fa-plus"/]
  [/@]
  [/@]
  
  [/@]
  
    [#assign datas=frame.createHql(entityName,10)()]
    [@frame.body]
  [@table.table id="block" datas=datas prms=prms.url]
    [@table.box path="id"/]
    [@table.text path="title" name="标题" sort=true/]
    [@table.image path="headimg" name="标题图"/]
    [@table.text path="articleType.name" name="类型"/]
    [@table.text path="pageBlock.name" name="板块"/]
    [@table.text path="pageChannel.name" name="栏目"/]
    [@table.date path="createTime" name="创建时间"/]
    [@table.date path="flashTime" name="刷新时间"/]
    [@table.body path="top" name="置顶";item]
    	[#if item.top]<i class="fa fa-check" style="color:green;"></i>[/#if]
    [/@]
    [@table.body path="hot" name="热点";item]
    	[#if item.hot]<i class="fa fa-check" style="color: green;"></i>[/#if]
    [/@]
    [@table.body path="id" name="预览";item]
    	<a href="javaScript:void(0)" id="view_${item.id}"><i class="fa fa-eye"></i></a>
    	<script type="text/javascript">
    		$(function(){
    			$("#view_${item.id}").click(function(){
    				box.dialog("${base}/admin/cms/article/article_normal_view.shtml?id=${item.id}",{width:800,height:600},{});
    			});
    		});
    	</script>
    [/@]
    [@jsec.authBlock perms=["${entityName}_ctrl"]]
    [@table.body name="操作";item]
        [@html.btngroup]
            [@html.href href="${base}${pathRoot}normal_form.shtml?id=${item.id}" icon="fa-edit"/]
            [@html.href href="${base}${pathRoot}remove.shtml?id=${item.id}" class="" icon="fa-remove" confirm="是否删除文章？"/]
        [/@]
    [/@]
    [/@]
    [/@]
    [@frame.pagesBar data=datas prms=jweb.params("prm").url+jweb.sort().url!/]
    [/@]
[/@]